home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gdosexam / gdosexam.bas < prev    next >
BASIC Source File  |  1995-04-27  |  1KB  |  48 lines

  1. ' Example program by Tom Wilkinson 1994 in Hisoft Basic 2.1
  2. ' This code shows how to load, list and select fonts under gdos
  3. ' and speedo gdos. The structure isn't the greatest, but at 
  4. ' least  you won't have to get the headache I got trying to 
  5. ' learn about printing speedo fonts to the screen.
  6.  
  7. DEFINT a-z
  8. LIBRARY "GEMVDI" 
  9. LIBRARY "SPEEDO"
  10. LIBRARY "GEMAES"
  11.  
  12. alert1$="[2][This program requires gdos][Cancel|OK]"
  13.  
  14. REM the following if endif loop just tests for gdos and quits
  15. REM the program if gdos or speedo is not installed
  16.  
  17. IF(GDOS%)=0 THEN 
  18.     x=FORM_ALERT(1, alert1$)
  19.     STOP
  20. END IF
  21.  
  22. PRINT "Loading Fonts"
  23. element_num=vst_load_fonts ' load speedo fonts
  24. PRINT "done..."
  25.  
  26. REM the following routine finds the index number of each loaded
  27. REM font and prints its name, index number and font number
  28.  
  29. FOR y = 1 TO element_num
  30. x=vqt_name(y,name$)
  31. PRINT "Font Name Is ";name$;" Font Number is ";x;" Element_num= ";y
  32. NEXT y
  33. PRINT
  34. PRINT "Above are the fonts loaded in your system."
  35. PRINT "Press a key to continue" 
  36. a=INP(2)
  37.  
  38. REM The following stuff clears the screen, sets the font, colour and size
  39. REM and then writes yabadabadoo to the screen
  40.  
  41. v_clrwk ' clears the screen
  42. vst_font(3000) ' sets font to dutch
  43. vst_color(2) ' sets font colour to red
  44. vst_height(36) 'sets height to 36 points
  45. v_ftext 100,100,"yabadabadoo" 'writes graphic text
  46.  
  47.  
  48.